package com.coderknock.jedis.push;

import redis.clients.jedis.Jedis;

/**
 * @author mouliu
 * 消息订阅
 * **/
public class Subscriber1 {
    public void sub(final Jedis jedis, final PushSubListener listener) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("订阅到讯息……");
                jedis.subscribe(listener, new String[]{"D00C003", "hello"});
            }
        }).start();
    }
}
